
package me.zhengjie.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author IQW
* @date 2022-07-18
**/
@Entity
@Data
@Table(name="app_daka_config")
public class AppDakaConfig implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "ID")
    private Integer id;

    @Column(name = "area_id")
    @ApiModelProperty(value = "责任区ID")
    private Integer areaId;

    @Column(name = "num")
    @ApiModelProperty(value = "2或4时间点")
    private Integer num;

    @Column(name = "address")
    @ApiModelProperty(value = "地址")
    private String address;

    @Column(name = "lon")
    @ApiModelProperty(value = "经度")
    private Double lon;

    @Column(name = "lat")
    @ApiModelProperty(value = "纬度")
    private Double lat;

    @Column(name = "time1")
    @ApiModelProperty(value = "time1")
    private String time1;

    @Column(name = "time2")
    @ApiModelProperty(value = "time2")
    private String time2;

    @Column(name = "time3")
    @ApiModelProperty(value = "time3")
    private String time3;

    @Column(name = "time4")
    @ApiModelProperty(value = "time4")
    private String time4;

    @Column(name = "wifi")
    @ApiModelProperty(value = "允许WIFI名称")
    private String wifi;

    @Column(name = "fanwei")
    @ApiModelProperty(value = "范围多少米")
    private Integer fanwei;

    @Column(name = "status")
    @ApiModelProperty(value = "状态")
    private Integer status;

    @Column(name = "create_time")
    @ApiModelProperty(value = "createTime")
    private Timestamp createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "updateTime")
    private Timestamp updateTime;

    public void copy(AppDakaConfig source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}